package com.neuedu.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neuedu.dao.SalesDao;
import com.neuedu.model.Sales;
import com.neuedu.service.SalesService;

@Service
public class SalesServiceImpl implements SalesService {

	// 依赖注入
	@Autowired
	private SalesDao SalesDao;
	
	public void setSalesDao(SalesDao SalesDao) {
		this.SalesDao = SalesDao;
	}
	
	@Override
	public int countSales() {
		return SalesDao.countSales();
	}

	@Override
	public List<Sales> findAll(Map<String, Object> map) {
		return SalesDao.findAll(map);
	}

	@Override
	public int addSales(Sales u) {
		return SalesDao.addSales(u);
	}

	@Override
	public int updateSales(Sales u) {
		return SalesDao.updateSales(u);
	}

	@Override
	public int deleteSales(int id) {
		return SalesDao.deleteSales(id);
	}

}
